﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using SingleUserMall.Authorization.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Items.VO
{
    [AutoMapFrom(typeof(ItemComment))]
    public class ItemCommentVO : EntityDto<long>
    {
        /// <summary>
        /// 星级
        /// </summary>
        public int Star { get; set; }
        /// <summary>
        /// 评论标签（,分割，如送达准时）
        /// </summary>
        public string Tags { get; set; }
        /// <summary>
        /// 评论内容
        /// </summary>
        public string Comment { get; set; }
        /// <summary>
        /// 评论图片（,分割）
        /// </summary>
        public string CommentImages { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        internal User inUser { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string Avatar => inUser?.Avatar;
        /// <summary>
        /// 昵称
        /// </summary>
        public string Name => inUser?.Name;
        /// <summary>
        /// 用户是否vip
        /// </summary>
        public bool IsVip => inUser?.IsVip ?? false;
        /// <summary>
        /// 回复内容
        /// </summary>
        public string ReplyComment { get; set; }
        /// <summary>
        /// 是否后台回复
        /// </summary>
        public bool HasReply { get; set; }
    }
}
